package design_pattern.iterator;

import java.util.List;

public abstract class AbstractObjectList {
    protected List<Object> objects;

    public AbstractObjectList(List<Object> objects) {
        this.objects = objects;
    }

    public void addObject(Object object) {
        objects.add(object);
    }

    public void removeObject(Object object) {
        this.objects.remove(object);
    }

    public List<Object> getObjects() {
        return objects;
    }

    public abstract AbstractIterators createIterators();
}
